home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / progjour / 1991 / 02 / driver.bas < prev    next >
BASIC Source File  |  1990-09-03  |  739b  |  32 lines

  1. 'driver.bas, a test driver for VLABEL.ASM
  2. '  Compiled with BASIC v 7.1, switch "/E"
  3.  
  4.    declare function vlabel$(a$)
  5.  
  6.    defstr a-z
  7.  
  8. restart:
  9.    line input "Enter a drive code: "; drive
  10.    if len(drive) <> 0 then
  11.       let code = ucase$(left$(drive,1))
  12.    else
  13.       let code = left$(curdir$,1)
  14.    end if    
  15. on error goto trap
  16.    let label = vlabel(drive)
  17. on error goto 0
  18.    if len(label) <> 0 then
  19.       print "Label on drive " chr$(34) code chr$(34) " is ";
  20.       print chr$(34) label chr$(34)
  21.    else
  22.       print "Drive " chr$(34) code chr$(34) " has no label."
  23.    end if
  24. done:
  25.    print
  26.    goto restart
  27.  
  28. trap:
  29.    print "Cannot read from drive " code ".  ";
  30.    print "Check door on drive."
  31.    resume done
  32.